package reflection.class_;

import cat.Cat;

import java.io.Serializable;
import java.lang.annotation.Annotation;

/**
 * @author DCSGO
 * @version 1.0
 * 哪些类型有Class对象
 * ————都有Class对象
 */
public class AllTypeClass {
    public static void main(String[] args) {
        Class<Cat> cls1 = Cat.class;//普通类
        Class<Number> cls2 = Number.class;//抽象类
        Class<Thread.State> cls3 = Thread.State.class;//枚举类
        Class<Serializable> cls4 = Serializable.class;//接口
        Class<Annotation> cls5 = Annotation.class;//注解
        Class<Integer> cls6 = int.class;//基本数据类型
        Class<Void> cls7 = void.class;//void
        Class<int[]> cls8 = int[].class;//数组
        Class<int[][]> cls9 = int[][].class;

        System.out.println(cls1);//class cat.Cat
        System.out.println(cls2);//class java.lang.Number
        System.out.println(cls3);//class java.lang.Thread$State
        System.out.println(cls4);//interface java.io.Serializable
        System.out.println(cls5);//interface java.lang.annotation.Annotation
        System.out.println(cls6);//int
        System.out.println(cls7);//void
        System.out.println(cls8);//class [I
        System.out.println(cls9);//class [[I
    }
}
